fix: add missing methods to RendererInterface and RouteCollectionInterface#10212
fix: add missing methods to RendererInterface and RouteCollectionInterface#10212jalexiscv wants to merge 1 commit into
Conversation
…rface Refs codeigniter4#6814 PHPStan reports errors when methods are called on interfaces but not declared in the interface definition. This adds missing methods: RendererInterface: - getData(): array - getPerformanceData(): array RouteCollectionInterface: - getRegisteredControllers(?string $verb = '*'): array The implementing classes (View, RouteCollection) already have these methods with matching signatures. Note: Several items from the original codeigniter4#6814 report were already fixed since v4.3 (QueryInterface::getOriginalQuery, ConnectionInterface @Property tags, RouteCollectionInterface::setHTTPVerb/isFiltered/ getFiltersForRoute/getRoutesOptions). Ref: codeigniter4#6814
|
Hi there, jalexiscv! 👋 Thank you for sending this PR! We expect the following in all Pull Requests (PRs).
Important We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md Sincerely, the mergeable bot 🤖 |
paulbalandan
left a comment
There was a problem hiding this comment.
This is a breaking change.
- Should target
4.8 - Add to the documentation/changelog
|
Closing due to no activity for over a month. We appreciate PRs sent but please ensure they’re complete or you’re prepared to complete them. Unfinished PRs simply add to maintainers’ review time and are not considerate of everyone’s time. |
Description
Addresses #6814 - Missing Interfaces (PHPStan errors)
Problem
PHPStan reports 22 errors when the baseline suppressions for interface-related issues are removed. These occur because methods/properties are called on interfaces but not declared in the interface definition.
Analysis of current state
Of the 22 original errors reported in #6814 (v4.3), several were already fixed:
Remaining issues fixed
getData()getPerformanceData()getRegisteredControllers()Changes
system/View/RendererInterface.php- add getData(), getPerformanceData()system/Router/RouteCollectionInterface.php- add getRegisteredControllers()Ref: #6814